
#include "Bulk.h"
#include <cstdio>

Bulk::Bulk(std::string name, double price_per, double weight)
    : weight_(weight)
    , Commodity(std::move(name), price_per)
{

}

double Bulk::CheckOut()
{
  double sum_p = price_per_ * weight_;
  printf("%-20s|%-10.2f|%-10.2f|%-10.2f\n", name_.c_str(), weight_, price_per_, sum_p);
  return sum_p;
}
